#ifndef _CPU_MONITOR_H_
#define _CPU_MONITOR_H_
/*
 *  cpu_monitor.h
 *  
 *              CPU Monitor 
 *
 *	 IOCTLS defenitions. 
 *
 *    Spring Semester.  044800.    Technion.
 *   Copyright (C) 2006  Evgeny Shulman  and Elizabeth Shtrom 
 */
 
#include <linux/ioctl.h> /* needed for the _IOW etc stuff used later */




/*
 * Ioctl definitions
 */
#define CPU_MONITOR_IOC_MAGIC  'h'
#define CPU_MONITOR_IOC_GET_REGS _IOR(CPU_MONITOR_IOC_MAGIC,1, struct regs_struct)
#define CPU_MONITOR_IOC_GET_GDT  _IOR(CPU_MONITOR_IOC_MAGIC,2, cm_desc_t [GDT_ENTRIES] )
#define CPU_MONITOR_IOC_GET_LDT  _IOR(CPU_MONITOR_IOC_MAGIC,3, cm_desc_t [LDT_ENTRIES] )
#define CPU_MONITOR_IOC_GET_TSS  _IOR(CPU_MONITOR_IOC_MAGIC,4, cm_tss_struct)
#define CPU_MONITOR_IOC_GET_IDT  _IOR(CPU_MONITOR_IOC_MAGIC,5, cm_gate_desc_t [IDT_ENTRIES] )
#define CPU_MONITOR_IOC_GET_PGD  _IOR(CPU_MONITOR_IOC_MAGIC,6, unsigned long [USER_ENTRIES] )
#define CPU_MONITOR_IOC_GET_PT   _IOR(CPU_MONITOR_IOC_MAGIC,7, unsigned long [USER_ENTRIES] )

#define CPU_MONITOR_IOC_IM_START _IO(CPU_MONITOR_IOC_MAGIC,8 )
#define CPU_MONITOR_IOC_IM_STOP  _IO(CPU_MONITOR_IOC_MAGIC,9 )
#define CPU_MONITOR_IOC_IM_READ  _IOR(CPU_MONITOR_IOC_MAGIC,10, struct im_irq_stat )
#define CPU_MONITOR_IOC_IM_IS    _IOR(CPU_MONITOR_IOC_MAGIC,11, int )
#define CPU_MONITOR_IOC_IM_RESET _IO(CPU_MONITOR_IOC_MAGIC,12)

#define CPU_MONITOR_IOC_GET_CPUID _IOR(CPU_MONITOR_IOC_MAGIC,13, cpuid_s )
#define CPU_MONITOR_IOC_PID   _IOR(CPU_MONITOR_IOC_MAGIC,14, int [2] )
#define CPU_MONITOR_IOC_MAXNR 15


#ifndef CPU_MONITOR_MAJOR
#define CPU_MONITOR_MAJOR 0   /* dynamic major by default */
#endif







#endif /* _CPU_MONITOR_H_ */

/* TODO to move to another file */








